package com.gmail.bloim.serg.t1006;

import java.util.ArrayList;

/**
 * User: Администратор
 * Date: 28.04.13
 * Time: 15:04
 */
public class Contour {
    private ArrayList<Integer> points = new ArrayList<Integer>();
    private ArrayList<Integer> depencencies = new ArrayList<Integer>();
    private int firstDep = -1;
    private int secondDep = -1;
    private boolean cycled = false;

    public Contour() {
    }

    public void addPoint(int point) {
        points.add(point);
    }

    public void addDependancy(Integer contour) {
        if (firstDep == -1)
            firstDep = contour;
        else
            secondDep = contour;
    }

    public ArrayList<Integer> getPoints() {
        return points;
    }

    public int getFirstDependencyPoint() {
        return firstDep;
    }

    public int getSecondDependencyPoint() {
        return secondDep;
    }

    public void setCycled(boolean cycled) {
        this.cycled = cycled;
    }

    public boolean isCycled() {
        return cycled;
    }
}
